import Vue from "vue"
import Vuex from 'vuex'
Vue.use(Vuex);

// 测试
const movie = {
    movieing:''
}
const video = {
    videoing:[]
}
const getid = {
    getiding:0
}

// tab切换传值
const leixin1 = {
    leixining1:''
}
const leixin2 = {
    leixining2:''
}
const leixin3 = {
    leixining3:''
}

// 分类值
const FlIn = {
    FlIning:''
}

// 按照热门排序值
const HotIndexs = {
    HotIndexsing:''
}


export default new Vuex.Store({
    state:{
        movie,
        video,
        ww:10,
        getid,
        leixin1,
        leixin2,
        leixin3,
        FlIn,
        HotIndexs
    },
    mutations:{
        movies(state,ids){
            console.log('仓库值：'+ids);
            state.movie = {
                movieing:ids
            }
        },
        videos(state,Mvideo){
            // console.log(Mvideo);
            state.video = {
                videoing:Mvideo
            }
        },
        mids(state,index){
            console.log(index);
            state.getid = {
                getiding:index
            }
        },
        Mnum1(state,index){
            state.leixin1 = {
                leixining1:index
            }
            console.log("仓库值tab切换1",state.leixin1.leixining1);
        },
        Mnum2(state,index){
            state.leixin2 = {
                leixining2:index
            }
            console.log("仓库值tab切换2",state.leixin2.leixining2);
        },
        Mnum3(state,index){
            state.leixin3 = {
                leixining3:index
            }
            console.log("仓库值tab切换3",state.leixin3.leixining3);
        },
        // 分类
        FlIndex(state,index){
            state.FlIn = {
                FlIning:index
            }
            console.log("仓库值tab切换3",state.leixin3.leixining3);
        },
        // 按热门排序和时间排序
        HotIndex(state,index){
            console.log("仓库",index);
            state.HotIndexs = {
                HotIndexsing:index
            }
        }
    }
})